The ARCRET utility has several parameters that you can use to select transactions which fall within or outside a given date range. When specifying dates for these parameters, be sure to use the YYYYMMDD format.
Keep in mind that these parameters assume the RUNDATE or CREATETIME variables are the names of the transaction date fields. The utility first looks for RUNDATE. If it is not found, the utility looks for CREATETIME (the name used by standard AFEMAIN archives).
If the utility finds RUNDATE it looks for the record which should be in YYYYMMDD format. When using CREATETIME, the utility assumes the date is in the internal HEXTIME format and converts it to YYYYMMDD format, comparing it to the dates specified. If neither field is found, the ARCRET utility displays an error and stops processing.
Note | For the remainder of this topic, assume that RUNDATE means either RUNDATE or CREATETIME and that the data value will be in YYYYMMDD format. |
Use the /BEF parameter to tell the utility to select records with a RUNDATE value that falls before a given date. Transactions with the specified date are excluded. For instance, to select transactions archived before 2001, you would specify:
/BEF=20010101
No records after December 31, 2000 are selected.
To select transactions with a RUNDATE that falls after a given date, use the /AFT parameter. Transactions with the specified date are excluded. For instance, to select the transactions archived in 2001, specify:
/AFT=20001231
All records after December 31. 2000 are selected.
You can also use these parameters together to specify a range. When you use both parameters, the utility assumes you want a logical AND comparison, so the /BEF date should fall after the /AFT date. For example, to select all records for the year 2000, you would specify these parameters:
ARCRET /AFT=19991231 /BEF=20010101
This tells the utility to select all transaction with a RUNDATE that falls within the two dates. You can also include the /OR parameter to omit records that fall within a certain range.
When you use the /BEF, /AFT, and /OR parameters, the utility excludes the transactions which fall within the dates specified. For example, to select all records except those which fall in the year 2000, you would specify these parameters:
ARCRET /BEF=20000101 /OR /AFT=20011231
Note that when you use the /OR parameter, you identify the earlier date using the /BEF parameter and the later date with the /AFT parameter.
Note | Where you place the parameters in the command does not matter. |
The ARCRET utility tries to validate the date ranges you specify based on the parameters you enter. If the utility detects a combination of parameters or values that do not make sense, it displays an error message and stops.
© Copyright 2014, Oracle and/or its affiliates. All rights reserved. Legal notices.